package com.example.manager.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Mybatis配置
 */
@Configuration
@MapperScan("com.example.manager.mapper")
public class MybatisPlusConfig {

    /**
     * 分页插件
     * 解决total显示0的问题
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
